/* 进程监控样式 */
.process-tabs {
    display: flex;
    margin-bottom: 25px;
    background: white;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    gap: 8px;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    color: #6c757d;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    transition: left 0.5s ease;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button.active {
    color: white;
    background: linear-gradient(135deg, #667eea, #764ba2);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.tab-button:hover:not(.active) {
    color: #495057;
    background: #f8f9fa;
    transform: translateY(-1px);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.controls-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 249, 250, 0.95));
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.filter-section {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-section label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #495057;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    background: rgba(108, 117, 125, 0.1);
    border: 1px solid rgba(108, 117, 125, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-section label:hover {
    background: rgba(0, 123, 255, 0.1);
    border-color: rgba(0, 123, 255, 0.3);
    color: #007bff;
}

.filter-section input[type="text"] {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    width: 180px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.filter-section input[type="text"]:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
}

.filter-section input[type="text"]::placeholder {
    color: #adb5bd;
    font-style: italic;
}

.filter-section input[type="checkbox"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #dee2e6;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.filter-section input[type="checkbox"]:checked {
    background: #007bff;
    border-color: #007bff;
}

.filter-section input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    left: 2px;
    top: -2px;
    color: white;
    font-size: 14px;
    font-weight: bold;
}

.filter-section label:has(input[type="checkbox"]:checked) {
    background: rgba(0, 123, 255, 0.15);
    border-color: rgba(0, 123, 255, 0.3);
    color: #007bff;
}



.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background-color: #545b62;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

.table-container {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
}

.process-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: white;
}

.process-table th,
.process-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
}

.process-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    font-weight: 600;
    color: #495057;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
}

.process-table th.sortable {
    cursor: pointer;
    user-select: none;
    transition: all 0.3s ease;
    position: relative;
}

.process-table th.sortable:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    color: #667eea;
    transform: translateY(-1px);
}

.process-table th.sortable.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.sort-icon {
    margin-left: 5px;
    font-size: 12px;
    opacity: 0.6;
    transition: all 0.3s ease;
}

.process-table th.sortable:hover .sort-icon {
    opacity: 1;
}

.process-table th.sortable .sort-icon::after {
    content: '⇅';
    color: #adb5bd;
    font-weight: normal;
}

.process-table th.sortable.sort-asc .sort-icon::after {
    content: '↑';
    color: #28a745;
    font-weight: bold;
}

.process-table th.sortable.sort-desc .sort-icon::after {
    content: '↓';
    color: #dc3545;
    font-weight: bold;
}

.process-table th.sortable.active .sort-icon {
    opacity: 1;
    font-weight: bold;
}

/* 无排序状态（默认状态）的视觉反馈 */
.process-table th.sortable:not(.sort-asc):not(.sort-desc) .sort-icon::after {
    content: '⇅';
    color: #adb5bd;
    font-weight: normal;
}

.process-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea, #764ba2);
}

.process-table tr:hover {
    background: linear-gradient(135deg, #f8f9ff, #fff);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.process-table tr:hover td {
    border-color: rgba(102, 126, 234, 0.2);
}

.process-table .loading {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 60px 40px;
    background: linear-gradient(135deg, #f8f9fa, #fff);
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
}

.status-established {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
    border-color: #155724;
}

.status-listen {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
    border-color: #0c5460;
}

.status-close-wait {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
    border-color: #856404;
}

.status-time-wait {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
    border-color: #721c24;
}

.protocol-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.protocol-tcp {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.protocol-udp {
    background: linear-gradient(135deg, #28a745, #1e7e34);
    color: white;
}

.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-btn.view {
    background: linear-gradient(135deg, #007bff, #0056b3);
    color: white;
}

.action-btn.view:hover {
    background: linear-gradient(135deg, #0056b3, #004085);
}

.action-btn.kill {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
}

.action-btn.kill:hover {
    background: linear-gradient(135deg, #c82333, #bd2130);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
}

.process-detail {
    margin-top: 20px;
}

.process-detail h4 {
    margin-bottom: 10px;
    color: #333;
}

.process-detail dl {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 10px;
    margin: 0;
}

.process-detail dt {
    font-weight: 600;
    color: #666;
}

.process-detail dd {
    margin: 0;
    color: #333;
}

.connections-list {
    margin-top: 20px;
}

.connection-item {
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 8px;
    font-family: monospace;
    font-size: 13px;
}

/* 分页控件样式 */
.pagination-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-btn {
    padding: 6px 12px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    border-radius: 4px;
    font-size: 14px;
    color: #495057;
    transition: all 0.3s ease;
}

.pagination-btn:hover:not(:disabled) {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

.pagination-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: #f8f9fa;
    color: #6c757d;
}

.page-size-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.page-size-select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

@media (max-width: 768px) {
    .filter-section {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-section input[type="text"] {
        width: 100%;
    }
    
    .process-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        text-align: left;
        border-bottom: none;
        border-left: 2px solid transparent;
    }
    
    .tab-button.active {
        border-left-color: #007bff;
    }
    
    .process-table {
        font-size: 12px;
    }
    
    .process-table th,
    .process-table td {
        padding: 8px;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    /* 移动端分页控件调整 */
    .pagination-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .pagination-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .pagination-btn {
        min-width: 60px;
    }
}